#ifndef BCH_ENCODE_HPP
#define BCH_ENCODE_HPP

#include <NTL/GF2X.h>
#include <NTL/GF2E.h>
#include <NTL/vec_GF2.h>
#include <NTL/GF2.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

NTL_CLIENT

namespace BCHEncoder{
  // encode a message
  void encode(vec_GF2& codeword, const vec_GF2& msg, const GF2X& genpol);
  // compute the generator polynomial from p, m, t and pol
  void compute_generator_polynomial(GF2X& genpol);
  // generate a random codeword of the constructed BCH code
  void generate_random_codeword(vec_GF2& codeword, const GF2X& genpol);

}




#endif //BCH_ENCODE_HPP
